package io.github.ali.commons.lock;

/**
 * @author bailey
 */
public interface LockerFactory {
	public String DEFAULT_LOCKER_NAME = "DEFAULT_LOCKER";
	/**
	 * Locker的默认实现类；无需指定RequireLock.lockerName
	 * @return
	 */
	public Locker create();

	/**
	 * 多个Locker实现时重写此方法；使用RequireLock.lockerName来指定实现类
	 * @param lockerName
	 * @return
	 */
	default public Locker create(String lockerName) {
		return null;
	}

}
